package adv10;

import java.beans.XMLDecoder;
import java.io.FileInputStream;
import java.util.List;

public class ReadXMLFrom2 { 
	public static void main(String[] args) throws Exception{
		XMLDecoder xd=new XMLDecoder(new FileInputStream("products3.xml"));
		List<Product> list=(List<Product>) xd.readObject();
		xd.close();
		for(Product p:list){
			System.out.println(p.getItemno()+","+p.getName()+","+p.getPrice());
		}
	}

}
